package com.hexacta.hrs.domain.feedback;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class FeedbackPeriodMentorReport {
	
	private FeedbackPeriod feedbackPeriod;
	
	private List<FeedbackMentorSkill> feedbackMentorSkill;
	
	private List<FeedbackMentorEffortScore> feedbackMentorEffortScore; 
	
	public FeedbackPeriodMentorReport() {
	}
	
	public FeedbackPeriodMentorReport(FeedbackPeriod feedbackPeriod,
			List<FeedbackMentorSkill> feedbackMentorSkill,
			List<FeedbackMentorEffortScore> feedbackMentorEffortScore) {
		super();
		this.feedbackPeriod = feedbackPeriod;
		this.feedbackMentorSkill = feedbackMentorSkill;
		this.feedbackMentorEffortScore = feedbackMentorEffortScore;
	}

	public FeedbackPeriod getFeedbackPeriod() {
		return feedbackPeriod;
	}

	public void setFeedbackPeriod(FeedbackPeriod feedbackPeriod) {
		this.feedbackPeriod = feedbackPeriod;
	}

	public List<FeedbackMentorSkill> getFeedbackMentorSkill() {
		return feedbackMentorSkill;
	}

	public void setFeedbackMentorSkill(List<FeedbackMentorSkill> feedbackMentorSkill) {
		this.feedbackMentorSkill = feedbackMentorSkill;
	}

	public List<FeedbackMentorEffortScore> getFeedbackMentorEffortScore() {
		Collections.sort(feedbackMentorEffortScore, new Comparator<FeedbackMentorEffortScore>() {
			@Override
			public int compare(FeedbackMentorEffortScore o1,FeedbackMentorEffortScore o2) {
				return o1.getEvaluator().getPerson().getName().compareTo(o2.getEvaluator().getPerson().getName());
			}
		});
		Collections.sort(feedbackMentorEffortScore, new Comparator<FeedbackMentorEffortScore>() {
			@Override
			public int compare(FeedbackMentorEffortScore o1,FeedbackMentorEffortScore o2) {
				return o1.getProject().compareTo(o2.getProject());
			}
		});
		return feedbackMentorEffortScore;
	}

	public void setFeedbackMentorEffortScore(
			List<FeedbackMentorEffortScore> feedbackMentorEffortScore) {
		this.feedbackMentorEffortScore = feedbackMentorEffortScore;
	}
	
	
	
}
